/*
 * Term.h
 *
 *  Created on: Nov 3, 2011
 *      Author: gassa
 */

#ifndef TERM_H_
#define TERM_H_

#include <map>
#include <string>

namespace std {

struct PostingItem {
	//term-frequency
	int tf;
	PostingItem(const int _tf) : tf(_tf) {}
};
//key:docId
typedef std::map<size_t, PostingItem*> PostingListContainer;

class Term {
public:
	std::string termString;
	size_t tid;
	size_t offset;
	int df;
	PostingListContainer* pl;
	std::string plString;
	Term(size_t _tid, size_t _offset){
		tid = _tid;
		offset = _offset;
	}
};

} /* namespace falon */
#endif /* TERM_H_ */
